\begin{tikzpicture}[>=Stealth]
    \draw [->] (-2.5,0) -- (4.5,0) node[anchor=north] {$x$};
    \draw [->] (0,-2.5) -- (0,3.5) node[anchor=east] {$y$};
    \node at (0.3,-0.3) {$O$};
    
    \coordinate (O) at (0, 0);
    \coordinate [label=180:{$P(c,c)$}] (P) at (-1,-1);
    \coordinate [label=90:{$M(a,b)$}] (M) at (0.7,2);
    \coordinate [label=300:{$M'(b,a)$}] (M') at (2,0.7);
    
    \draw[dash pattern=on 5mm off 2mm] (-1.5, -1.5) -- (2.5, 2.5) +(0.5, -0.3) node {$y = x$};
    \draw (O) -- (M) -- (M') -- cycle;
    \draw (P) -- (M) -- (M') -- cycle;
\end{tikzpicture}
